package com.example.tuike.config;

import com.example.tuike.common.TokenBucketLimiter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/*** @Author supersaiya
 * @Description TODO

 * @Date 2025/2/9 16:51

 * @Version 1.0*/
@Configuration
public class LimiterConfig {
    @Bean
    public TokenBucketLimiter tokenBucketLimiter() {
        return new TokenBucketLimiter(10, 10); // 每秒生成10个令牌，最大容量为10
    }
}